package com.ruoyi.testing.service.impl;

import com.ruoyi.testing.domain.EntrustmentAgreementDetail;
import com.ruoyi.testing.domain.EntrustmentTest;
import com.ruoyi.testing.mapper.EntrustmentAgreementDetailMapper;
import com.ruoyi.testing.service.IEntrustmentAgreementDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 项目委托书详情信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-16
 */
@Service
public class EntrustmentAgreementDetailServiceImpl implements IEntrustmentAgreementDetailService
{
    @Autowired(required = false)
    private EntrustmentAgreementDetailMapper entrustmentAgreementDetailMapper;

    /**
     * 查询项目委托书详情信息
     * 
     * @param id 项目委托书详情信息主键
     * @return 项目委托书详情信息
     */
    @Override
    public EntrustmentAgreementDetail selectEntrustmentAgreementDetailById(String id)
    {
        return entrustmentAgreementDetailMapper.selectEntrustmentAgreementDetailById(id);
    }

    /**
     * 根据项目编号查询详情列表
     * @param agreementNum
     * @return
     */
    @Override
    public List<EntrustmentAgreementDetail> selectEntrustmentAgreementDetailByNum(String agreementNum, String state) {
        return entrustmentAgreementDetailMapper.selectEntrustmentAgreementDetailByNum(agreementNum, state);
    }

    /**
     * 根据项目编号和类别查询详情信息
     *
     * @param agreementNum
     * @param sampleType
     */
    @Override
    public EntrustmentAgreementDetail selectEntrustmentAgreementDetailByNumAndType(String agreementNum, String sampleType) {
        return entrustmentAgreementDetailMapper.selectEntrustmentAgreementDetailByNumAndType(agreementNum, sampleType);
    }

    /**
     * 查询报告处理委托单详情信息
     *
     * @param entrustmentTest
     */
    @Override
    public List<EntrustmentTest> selectEntrustmentReportDetail(EntrustmentTest entrustmentTest) {
        return entrustmentAgreementDetailMapper.selectEntrustmentReportDetail(entrustmentTest);
    }

    /**
     * 查询项目委托书详情信息列表
     * 
     * @param entrustmentAgreementDetail 项目委托书详情信息
     * @return 项目委托书详情信息
     */
    @Override
    public List<EntrustmentAgreementDetail> selectEntrustmentAgreementDetailList(EntrustmentAgreementDetail entrustmentAgreementDetail)
    {
        return entrustmentAgreementDetailMapper.selectEntrustmentAgreementDetailList(entrustmentAgreementDetail);
    }

    /**
     * 新增项目委托书详情信息
     * 
     * @param entrustmentAgreementDetail 项目委托书详情信息
     * @return 结果
     */
    @Override
    public int insertEntrustmentAgreementDetail(EntrustmentAgreementDetail entrustmentAgreementDetail)
    {
        return entrustmentAgreementDetailMapper.insertEntrustmentAgreementDetail(entrustmentAgreementDetail);
    }

    /**
     * 修改项目委托书详情信息
     * 
     * @param entrustmentAgreementDetail 项目委托书详情信息
     * @return 结果
     */
    @Override
    public int updateEntrustmentAgreementDetail(EntrustmentAgreementDetail entrustmentAgreementDetail)
    {
        return entrustmentAgreementDetailMapper.updateEntrustmentAgreementDetail(entrustmentAgreementDetail);
    }

    /**
     * 批量删除项目委托书详情信息
     * 
     * @param ids 需要删除的项目委托书详情信息主键
     * @return 结果
     */
    @Override
    public int deleteEntrustmentAgreementDetailByIds(String[] ids)
    {
        return entrustmentAgreementDetailMapper.deleteEntrustmentAgreementDetailByIds(ids);
    }

    /**
     * 删除项目委托书详情信息信息
     * 
     * @param id 项目委托书详情信息主键
     * @return 结果
     */
    @Override
    public int deleteEntrustmentAgreementDetailById(String id)
    {
        return entrustmentAgreementDetailMapper.deleteEntrustmentAgreementDetailById(id);
    }
}
